import EnumAPI from './EnumAPI';
import {
  homeRoutes,
  mainRoutes,
  basicRoutes,
  RouteType
} from '@/config/routes';

export interface ChildConfig {
  category: string;
  prefixCls: string;
  timeout: number;
  apiSuccessCode: number;
  noCheckIsLoginApi: Array<string>;
  noCheckIsLoginRoutes: Array<string>;
  rootId: string;
  mainRoutes: Array<RouteType>;
  basicRoutes: Array<RouteType>;
  homeRoutes: Array<RouteType>;
}

/**
 * 框架一些配置信息
 * @type {{}}
 */
export const childConfig: ChildConfig = {
  category: 'dv',
  prefixCls: 'dv',
  timeout: 7000,
  apiSuccessCode: 200,
  rootId: 'dv-root',
  // 不需要验证是否登录的api
  noCheckIsLoginApi: [
    EnumAPI.login,
    EnumAPI.getCode
  ],
  // 不需要验证是否登录的路由配置
  noCheckIsLoginRoutes: [
    '/login',
  ],
  homeRoutes: homeRoutes,
  mainRoutes: mainRoutes,
  basicRoutes: basicRoutes,
};
